Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Tell  If  a  Specified  Worksheet  Exists  in  an  Excel  Workbook  

 Content of Tell If a Specified Worksheet Exists in an Excel Workbook.vbs
MD5 Hash: A1748F91C0EF4735A05C6E693F987C16
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\Scripts\Test.xls")

x = 0

For Each objWorksheet in objWorkbook.Worksheets
If objWorksheet.Name = "Budget" Then
x = 1
Exit For
End If
Next

objExcel.Quit

If x = 1 Then
Wscript.Echo "The specified worksheet was found."
Else
Wscript.Echo "The specified worksheet was not found."
End If



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a